

const str1 = '23isNBAbignumber';
const str2 = '玩螳螂lol还是找蒋总';
const str3 ='nba';
//部分查找 indexOf reg
const reg = /^nba$/i;
console.log(reg.test(str1));
console.log(reg.test(str2));
console.log(reg.test(str3));